﻿@model Mango.Models.WebSiteConfigModel
<form action="/WebSite/Config" method="post" id="form1">
    <table class="table table-bordered">
        <tbody>
            <tr>
                <td style="width:150px;">网站名称:<em style="color:red;">*</em></td>
                <td>
                    <input type="text" id="WebSiteName" name="WebSiteName" class="form-control col-4" value="@Model.WebSiteName" />
                </td>
            </tr>
            <tr>
                <td style="width:150px;">网站地址:<em style="color:red;">*</em></td>
                <td>
                    <input type="text" id="WebSiteUrl" name="WebSiteUrl" class="form-control col-4" value="@Model.WebSiteUrl" />
                </td>
            </tr>
            <tr>
                <td style="width:150px;">网站标题:<em style="color:red;">*</em></td>
                <td>
                    <input type="text" id="WebSiteTitle" name="WebSiteTitle" class="form-control col-4" value="@Model.WebSiteTitle" />
                </td>
            </tr>
            <tr>
                <td style="width:150px;">网站关键字:<em style="color:red;">*</em></td>
                <td>
                    <input type="text" id="WebSiteKeyWord" name="WebSiteKeyWord" class="form-control col-4" value="@Model.WebSiteKeyWord" />
                </td>
            </tr>
            <tr>
                <td style="width:150px;">网站描述:<em style="color:red;">*</em></td>
                <td>
                    <input type="text" id="WebSiteDescription" name="WebSiteDescription" class="form-control col-4" value="@Model.WebSiteDescription" />
                </td>
            </tr>
            <tr>
                <td style="width:150px;">网站备案号:<em style="color:red;">*</em></td>
                <td>
                    <input type="text" id="FilingNo" name="FilingNo" class="form-control col-4" value="@Model.FilingNo" />
                </td>
            </tr>
            <tr>
                <td style="width:150px;">其他设置:<em style="color:red;">*</em></td>
                <td>
                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="IsLogin" name="IsLogin" @(Model.IsLogin?"checked=\"checked\"":"") value="true">
                        <label class="form-check-label" for="IsLogin">是否开放用户登录</label>
                    </div>
                    <div class="form-check">
                        <input type="checkbox" class="form-check-input" id="IsRegister" name="IsRegister" @(Model.IsRegister?"checked=\"checked\"":"") value="true">
                        <label class="form-check-label" for="IsRegister">是否开放用户注册</label>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="width:150px;">底部版权:<em style="color:red;">*</em></td>
                <td>
                    <textarea class="form-control col-4" id="CopyrightText" name="CopyrightText" rows="5">@Html.Raw(Model.CopyrightText)</textarea>
                </td>
            </tr>
            <tr>
                <td style="width:150px;"></td>
                <td>
                    <input type="hidden" name="ConfigId" id="ConfigId"  value="@Model.ConfigId" />
                    <input type="button" id="btn_Post" class="btn btn-success" value="保 存" />
                </td>
            </tr>
        </tbody>
    </table>
</form>
@section Scripts{
    <script type="text/javascript">
        $("#btn_Post").click(function () {
            $("#form1").ajaxSubmit({
                success: function (res) {
                    if (res) {
                        layer.msg('保存成功');
                    }
                    else {
                        layer.msg('保存失败,请稍后再尝试');
                    }
                }
            });
        });
    </script>
}
